package adv331;

import java.io.*;

/**
 * @author oldliu
 * @since 1.0
 */
public class DataIn {
    public static void main(String[] args) {
//        try(DataOutputStream dout=new DataOutputStream(new FileOutputStream("d:/temp/2.txt"))){
//            dout.writeInt(12000);
//            dout.writeLong(12000);
//            dout.writeBoolean(2>1);
//            dout.writeBoolean(2<1);
//            dout.writeDouble(Math.PI);
//            dout.writeUTF("We change lives!");
//        }catch (IOException e){
//            e.printStackTrace();
//        }
        try(DataInputStream din=new DataInputStream(new FileInputStream("d:/temp/2.txt"))){
            int i=din.readInt();
            long l=din.readLong();
            boolean b1=din.readBoolean();
            boolean b2=din.readBoolean();
            double d=din.readDouble();
            String str=din.readUTF();

            System.out.println(i);
            System.out.println(l);
            System.out.println(b1);
            System.out.println(b2);
            System.out.println(d);
            System.out.println(str);
        }catch (IOException e){
            e.printStackTrace();
        }
    }
}
